﻿<%@ Page validateRequest="false" Language="C#" AutoEventWireup="true" CodeBehind="EditInvitation.aspx.cs" Inherits="BEELab.EditInvitation" %>
<%@ Import Namespace="System.Data" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" href='./Content/css/style.css' />
    <link rel="stylesheet" type="text/css" href='./Content/css/source/jquery.fancybox.css' media="screen" />
    <script src='<%: ResolveClientUrl("~/Scripts/jquery-1.10.2.min.js")%>'></script>
    <script src='<%: ResolveClientUrl("~/Content/css/source/jquery.fancybox.js?v=2.1.5")%>'></script>
</head>
<body style="width: 640px; padding: 24px; background-color:#ffffff">
    <asp:literal id="literal1" runat="server"></asp:literal>
    <br />
    <form id="form1" runat="server">
        <div id="Div1" class="clearfix">
        <asp:Label ID="lblEdit" runat="server">
            <h2 class="headline">Edit Invitation</h2>
        </asp:Label>
        <div id="new-data">
                <h3>Invitation Details</h3>
                <div class="sign-form">
                <div class="input-hold">
                    <asp:Label ID="Label1" CssClass="sign-label" AssociatedControlID="txtName" runat="server">Name</asp:Label>
                    <asp:TextBox CssClass="sign-input" ID="txtName" runat="server" Width="200px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvtxtName" ForeColor="Red" ValidationGroup="Invitaion" ControlToValidate="txtName" runat="server" ErrorMessage="* Name is required" Text="*"></asp:RequiredFieldValidator>
                </div>

                <div class="input-hold">
                    <asp:Label ID="Label2" CssClass="sign-label" AssociatedControlID="txtUniqueCode" runat="server">Invitation Code</asp:Label>
                    <asp:TextBox CssClass="sign-input" ID="txtUniqueCode" ReadOnly="true" runat="server" Width="200px"></asp:TextBox>
                </div>

                <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                <div class="input-hold">
                    <asp:Label ID="Label8" CssClass="sign-label" AssociatedControlID="rblHeader" runat="server">Show Header</asp:Label>
                    <asp:RadioButtonList AutoPostBack="true" CssClass="sign-radio list-space" runat="server" OnSelectedIndexChanged="rblHeader_SelectedIndexChanged" ID ="rblHeader" RepeatDirection="Horizontal">
                        <asp:ListItem Text="Yes" Value="Yes" Selected="True"></asp:ListItem>
                        <asp:ListItem Text="No" Value="No"></asp:ListItem>
                    </asp:RadioButtonList>
                </div>

                <div class="input-hold">
                    <asp:HyperLink ID="HyperLink1" Target="_blank" runat="server" NavigateUrl="~/Logic/Execution/Execute.aspx?InvitationCode=">asd</asp:HyperLink>
                </div>
                </ContentTemplate>
                </asp:UpdatePanel>

                <div class="input-hold">
                    <p><strong>Initial Variable Values:</strong></p>
                    
                    <asp:Repeater runat="server" ID="rptSessionVariable" OnItemDataBound="rptSessionVariable_ItemDataBound">
                        <ItemTemplate>
                            <div class="sessionhold">
                                <asp:Label class="sign-label2" ID="lblName" AssociatedControlID="txtVariable" runat="server"><%# ((DataRowView)Container.DataItem)["Name"] + " (Scope:" + ((DataRowView)Container.DataItem)["Scope"] + ")" %> </asp:Label>
                                <asp:TextBox CssClass="sign-input" ID="txtVariable" runat="server" Text=''></asp:TextBox>
                                <asp:Label runat="server" ID="lblVariableId" Visible="false" Text='<%#: ((DataRowView)Container.DataItem)["ID"]%>'></asp:Label>
                                <asp:Label runat="server" ID="lblOldValue" Visible="false" Text=""></asp:Label>
                                <asp:RequiredFieldValidator ValidationGroup="Invitaion" ID="RequiredFieldValidator2" ForeColor="Red" ControlToValidate="txtVariable" runat="server" ErrorMessage="* Variable Value is required."></asp:RequiredFieldValidator>
                            </div>
                        </ItemTemplate>
                    </asp:Repeater>

                </div>

                <div class="input-hold">
                    <asp:Button runat="server" ID="btnSubmit" Text="Submit" CssClass="sign-submit" ValidationGroup="Invitaion" OnClick="btnSubmit_Click" />
                </div>
            </div>
            <div class="error">
                <asp:ValidationSummary ID="vsInvitation" runat="server" ValidationGroup="Invitaion" />
                <p>&nbsp</p>
            </div>


            </div>
        </div>
    </form>
</body>
</html>
